//
//  ldxFenLei.m
//  青春音乐OFJH
//
//  Created by mac on 16-11-16.
//  Copyright (c) 2016年 jh.chen. All rights reserved.
//

#import "ldxFenLei.h"

@implementation ldxFenLei
//解析的初始化方法
- (ldxFenLei*)initWithsingName:(NSString*)singName andsinger:(NSString*)singer {
    //1.用父类初始化自己
    self = [super init];
    
    //2.判读是否为空，不为空就赋值相关属性
    if (self)
    {
        self.singer = singer;
        self.singName = singName;
    }
    
    //3.返回本类的对象
    return self;
    
    
    
}

//简化的初始化方法
- (ldxFenLei*)initWithDic:(NSDictionary*)dic{
    //1.用父类初始化自己
    self = [super init];
    
    //2.判读是否为空，不为空就赋值相关属性
    if (self)
    {
        self.singer = [dic objectForKey:@"singer"];
        self.singName = [dic objectForKey:@"singName"];
        
    }
    
    //3.返回本类的对象
    return self;
    
    
}

//定义类方法
+ (ldxFenLei*)LDXpeopleWith:(NSDictionary*)dic{
    
    return [[self alloc]initWithDic:dic];
    
    
}

@end
